<template>
  <div>
    <div class="rightwrap-foot">
      <div class="hot-anchor">
        <span>热门主播</span>
      </div>
      <ul>
        <li
          class="anchorr-cube"
          v-for="{ nickName, id, avatarUrl, score } in data"
          :key="id"
        >
          <img :src="avatarUrl" alt="" />
          <div class="anchor-details">
            <span>{{ nickName }}</span>
            <span>评分：{{ score }}</span>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  mounted() {
    this.getData();
  },
  data() {
    return {
      data: [],
    };
  },
  methods: {
    getData() {
      this.axios.get("/dj/toplist/popular?limit=5").then((res) => {
        this.data = res.data.data.list;
        console.log(this.data);
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.rightwrap .rightwrap-foot {
  height: 400px;
}

.rightwrap-foot .hot-anchor {
  margin: 10px auto 20px;
  line-height: 30px;
  height: 30px;
  width: 82%;
  border-bottom: 1px solid #ccc;
}

.rightwrap-foot .hot-anchor span {
  color: rgb(29, 29, 29);
  font-size: 12px;
  font-weight: 600;
}

.rightwrap-foot ul {
  margin: 0 auto;
  width: 82%;
}

.rightwrap-foot ul li {
  cursor: pointer;
  margin-top: 10px;
  height: 40px;
  width: 100%;
  display: flex;
  justify-content: flex-start;
}

.rightwrap-foot ul li img {
  width: 40px;
}

.anchor-details span:first-child {
  display: block;
  color: #333333;
  font-size: 12px;
  margin: 5px 0 5px 5px;
}

.anchor-details span:last-child {
  display: block;
  color: #666666;
  font-size: 12px;
  margin: 5px;
}

.rightwrap-foot ul li:hover .anchor-details {
  background-color: #f7f7f7;
}
</style>
